<template>
  <div class="oo">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="账号">
        <el-input style="width: 400px" v-model="form.account" placeholder="账号"></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input style="width: 400px" placeholder="密码" v-model="form.secret"></el-input>
      </el-form-item>
      <el-form-item label="昵称">
        <el-input style="width: 400px" placeholder="昵称" v-model="form.nickname"></el-input>
      </el-form-item>
      <el-row class="bn">
        <el-button type="info" plain >注册</el-button>
      </el-row>
    </el-form>
  </div>
</template>

<script>
  export default {
    name: "Register",
    data() {
      return {
        http:this.config.ip,
        token:"",
        form: {
          account: '',
          secret: '',
          nickname:'',
          type:100
        }
      }
    },
    methods: {
      login_get_token() {
        this.$http.post(this.http+"/v1/token", this.form).then(res=>{
          this.token=res.data.token;
          console.log(this.token)
        })
      }
    }
  }
</script>

<style scoped>
  .oo{
    margin-top: 300px;
    margin-left: 500px;
  }
  .bn{
    margin-left: 220px;
  }
</style>
